<template>
  <div style="width: 100%;height: 100%;display: flex;flex-direction: row;justify-content: space-around;align-items: center;">
        <div style="width: 60%;height: 98%;display: flex;flex-direction: column;justify-content: space-between;align-items: center; ">
            <div style="width: 100%;height:36%;background-color: #061F33;display: flex;flex-direction: column;justify-content: space-between;align-items: flex-start;">
            <div style="width:94%;height: 5%;margin-top: 2%;"><ana-title> <div slot="title">设备当前故障信息</div></ana-title></div>
              <current-diag style="margin-top:2%;width: 98%;"></current-diag>
            </div>
            <div style="width: 100%;height: 60%;background-color: #061F33;display: flex;flex-direction: column;justify-content: space-between;align-items: flex-start;overflow: hidden">
              <div style="width:94%;height: 5%;margin-top: 2%;"><ana-title> <div slot="title">设备历史故障信息</div></ana-title></div>
              <!-- <failure-chart  :echartsData="params"></failure-chart> -->
              <failure-data style="width:98%;height: 90%;"></failure-data>
          </div>
        </div>
        
        <div style="width: 35%;height:98%;background-color: #061F33;display: flex;flex-direction: column;justify-content: space-between;align-items: center;overflow: hidden"> 
        <div style="width:94%;height: 5%;margin-top: 2%;"><ana-title> <div slot="title">设备历史故障信息</div></ana-title></div>
        <hisdiag-chart></hisdiag-chart>
            </div>
 </div>
</template>

<script>
import FailureChart from "@/views/failureanalysis/FailureChart";
import CurrentDiag from "@/views/diagnosticview/CurrentDiag";
// import DevHisdiag from "@/views/diagnosticview/DevHisdiag";
import HisdiagChart from "@/views/diagnosticview/HisdiagChart";
import AnaTitle from '@/components/Mytitle/AnaTitle'
import FailureData from "@/views/diagnosticview/FailureData";
export default {
  components:{
    // DevHisdiag,
    FailureChart,
    CurrentDiag,
    HisdiagChart,
    AnaTitle,
    FailureData
  },
  data() {
    return {
      params:{ 
              dimensions: ['product', '晶闸管故障', 'BOD动作', '单阀冗余数'],
              source: [
                { product: 'Y1', '晶闸管故障': 43.3, 'BOD动作': 85.8, '单阀冗余数': 93.7 },
                { product: 'Y2','晶闸管故障': 83.1, 'BOD动作': 73.4, '单阀冗余数': 55.1 },
                { product: 'Y3', '晶闸管故障': 86.4, 'BOD动作': 65.2, '单阀冗余数': 82.5 },
                { product: 'Y4', '晶闸管故障': 72.4, 'BOD动作': 53.9, '单阀冗余数': 39.1 },
                { product: 'Y5', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                { product: 'Y6', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                { product: 'D1', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                { product: 'D2', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                { product: 'D3', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                { product: 'D4', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                { product: 'D5', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                { product: 'D6', '晶闸管故障': 30, 'BOD动作': 50, '单阀冗余数': 60 },
                      ]
              }
    }
    },
    methods: {
      ceshi(){
        console.log("dddd")
        this.params.source[0]={};
        let temp = this.params.source;
        this.params.source = [];
        this.params.source = temp;
        // if(this.params.source[0].晶闸管故障>100){
        //   this.params.source[0].晶闸管故障=0;
        // }
        console.log(this.params.source)
      }
      
    },
}
</script>

<style>

</style>